//
//  Video.swift
//  maopu
//
//  Created by 黄海波 on 2017/4/18.
//  Copyright © 2017年 maopu. All rights reserved.
//

import UIKit

class Video: NSObject {
    var id:Int? = 0{
        didSet{
            if id == nil{
                id = 0
            }
        }
    }
    
    var ownerId:Int? = 0{
        didSet{
            if ownerId == nil{
                ownerId = 0
            }
        }
    }
    
    var ownerAvatar:String? = ""{
        didSet{
            if ownerAvatar == nil{
                ownerAvatar = ""
            }
        }
    }
    
    var ownerName:String? = ""{
        didSet{
            if ownerName == nil{
                ownerName = ""
            }
        }
    }
    
    var content:String? = ""{
        didSet{
            if content == nil{
                content = ""
            }
        }
    }
    
    var media:VideoMedia? = nil
    
    var godComment:Dictionary<String , Any>?
    
    var isLike:Int? = 0{
        didSet{
            if isLike == nil{
                isLike = 0
            }
        }
    }
    
    var likeCount:Int? = 0{
        didSet{
            if likeCount == nil{
                likeCount = 0
            }
        }
    }
    
    var shareCount:Int? = 0{
        didSet{
            if shareCount == nil{
                shareCount = 0
            }
        }
    }
    
    var commentCount:Int? = 0{
        didSet{
            if commentCount == nil{
                commentCount = 0
            }
        }
    }
    
    var createTime:String? = ""{
        didSet{
            if createTime == nil{
                createTime = ""
            }
        }
    }
    
    var isShow:Bool = false
    
    

}

class VideoMedia: NSObject{
    var id:Int? = 0{
        didSet{
            if id == nil{
                id = 0
            }
        }
    }
    
    var type:String? = ""{
        didSet{
            if type == nil{
                type = ""
            }
        }
    }
    
    var videoDuration:CGFloat? = 0{
        didSet{
            if videoDuration == nil{
                videoDuration = 0
            }
        }
    }
    
    var videoThum:String? = ""{
        didSet{
            if videoThum == nil{
                videoThum = ""
            }
        }
    }
    
    var url:String? = ""{
        didSet{
            if url == nil{
                url = ""
            }
        }
    }
    
    var watchCount:Int? = 0{
        didSet{
            if watchCount == nil{
                watchCount = 0
            }
        }
    }
    
    var danmuCount:Int? = 0{
        didSet{
            if danmuCount == nil{
                danmuCount = 0
            }
        }
    }
    
}
